home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / LISTMANA / __TESTER / TESTERME.C1 < prev    next >
Text File  |  1989-06-25  |  2KB  |  70 lines

  1. /****                                                                    */
  2. /****    Code Testing System version 1.0 (beta)                            */
  3. /****                                                                    */
  4. /****    All portions of this source code are the property of Jack        */
  5. /****    Herrington.  I, Jack Herrington, give you permission to use        */
  6. /****    use or alter the code in any way that pleases you.  You must    */
  7. /****    however return by whatever means avaliable any improvements        */
  8. /****    you believe significant to Jack Herrington, accepting that        */
  9. /****    these improvements might be contained in later releases of        */
  10. /****    the code. I also grant you permission to remove this header        */
  11. /****    from any file you are WORKING on, as long as you put it back    */
  12. /****    when you're stopped WORKING on it.                                */
  13. /****                                                                    */
  14. /****    Jack Herrington: University Of Miami, Biomedical Computing        */
  15. /****                     1600 N.W. 10th Ave. (R-53)                        */
  16. /****                     (305) 547-6538                                    */
  17. /****                                                                    */
  18.  
  19. /****/
  20. /**** Handle the menus */
  21. /****/
  22.  
  23. #include "Tester.h"
  24.  
  25. /****/
  26. /**** Create the menus and refresh the bar */
  27. /****/
  28.  
  29. void TestMenuSetup()
  30. {
  31.     char charTmp[255];
  32.     int hand;
  33.  
  34.         /**** Apple Menu */
  35.  
  36.     charTmp[0] = 1;
  37.     charTmp[1] = appleMark;
  38.     Menus[0] = NewMenu(128,charTmp);
  39.     AppendMenu(Menus[0],"\PAbout Tester...");
  40.     InsertMenu(Menus[0],0);
  41.  
  42.         /**** File Menu */
  43.  
  44.     Menus[1] = NewMenu(129,"\PFile");
  45.     AppendMenu(Menus[1],"\PQuit");
  46.     InsertMenu(Menus[1],0);
  47.  
  48.         /**** Edit Menu */
  49.  
  50.     Menus[2] = NewMenu(130,"\PEdit");
  51.     AppendMenu(Menus[2],"\P(Undo;(-;(Cut;(Copy;(Paste");
  52.     InsertMenu(Menus[2],0);
  53.     DisableItem(Menus[2],0);
  54.  
  55.         /**** Window Menu */
  56.  
  57.     Menus[3] = NewMenu(131,"\PWindow");
  58.     for(hand=0;;hand++)
  59.     {
  60.         if(Handlers[hand].preLaunch == (-1))break;
  61.         (void)strcpy(charTmp,Handlers[hand].menuName);
  62.         (void)CtoPstr(charTmp);
  63.         AppendMenu(Menus[3],charTmp);
  64.     }
  65.     InsertMenu(Menus[3],0);
  66.  
  67.         /**** Update the menu bar */
  68.  
  69.     DrawMenuBar();
  70. }